package com.ysc.kob.controller.user.bot;

import com.ysc.kob.entity.Bot;
import com.ysc.kob.service.user.bot.BotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;
import java.util.List;

@RestController
@RequestMapping("/user/bot/")
public class BotController {
    @Autowired
    private BotService botService;

    @PostMapping("add/")
    public Map<String, String> add(@RequestParam Map<String, String> map) {
        return botService.addBot(map);
    }

    @PostMapping("remove/")
    public Map<String, String> remove(@RequestParam Map<String, String> map) {
        return botService.remove(map);
    }

    @PostMapping("update/")
    public Map<String, String> update(@RequestParam Map<String, String> map) {
        return botService.update(map);
    }

    @GetMapping("getList/")
    public List<Bot> getList(@RequestParam Map<String, String> map) {
        return botService.getList();
    }
}
